package com.apes.enquiry.orderForm.repository;

import com.apes.enquiry.orderForm.model.OrderFormDetail;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * 类描述：
 *
 * @ClassName AccumulatorExtendRepository
 * @Description 描述
 * @Author lilong
 * @Date 2022/10/31 14:04
 * @Version 1.0
 */
public interface OrderFormDetailRepository extends CustomRepository<OrderFormDetail,String> {
    @Query(value="SELECT * FROM  SP_ORDER_FORM_DETAIL T  WHERE T.ORDER_FORM_ID=:id", nativeQuery = true)
    List<OrderFormDetail> finByOrderForm(@Param("id") String id);

    @Query(value="SELECT * FROM  SP_ORDER_FORM_DETAIL T  WHERE T.BATURU_ORDER_NO=:orderId", nativeQuery = true)
    List<OrderFormDetail> finByOrderId(@Param("orderId") String orderId);

   /* @Modifying
    @Query(value="UPDATE  SP_ORDER_FORM_DETAIL T SET T.AOG_number=T.order_quantity  WHERE T.ORDER_FORM_ID=:id", nativeQuery = true)
    void updateByorderForm(@Param("id") String id);
    *//*@Modifying
    @Query(value="UPDATE  SP_ORDER_FORM_DETAIL T SET T.termination_number=T.order_quantity  WHERE T.ORDER_FORM_ID=:id", nativeQuery = true)
    void updateCancel(@Param("id") String id);*//*
    @Modifying
    @Query(value="UPDATE  SP_ORDER_FORM_DETAIL  SET quantity_shipped=order_quantity  WHERE ORDER_FORM_ID=:id", nativeQuery = true)
    void modificationConsigner(@Param("id") String id);*/


}
